using System;
using System.Globalization;
using System.Windows.Data;

using Core.Model.Hierarchy;

namespace UI.Resources.Converters
{
	class ProjectToTitleConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 
		{
	        string projectName = "";

			if (value != null)
			{
				projectName = String.Format(" - {0}", ((Project)value).Name);
			}
            return String.Format("RAE{0}", projectName);
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}